home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / environ.pqt / environ.pat
Text File  |  1985-09-27  |  2KB  |  45 lines

  1.                           -------------
  2.                           -ENVIRON.PAT-
  3.                           -------------
  4.  
  5.      The  following is a patch for COMMAND.COM (IBM-PC) to  allow 
  6. for a larger environment area.   Currently,  only 223 bytes total 
  7. are  allowed for environment string storage,  with all data  over 
  8. 223   bytes truncated.    A larger environment area can be  quite 
  9. useful  for passing variables between different programs  and  in 
  10. BATCH commands.
  11.  
  12. Use  the following patch to  increase  the size of this data area:
  13.  
  14.  
  15. For DOS 2.0:
  16.  
  17. 1) DEBUG COMMAND.COM                    (load COMMAND.COM into debugger)
  18.  
  19. 2) S 100 4600 BB 0A 00 B4 48 CD 21      (search for allocation call)
  20.  
  21. 3) Replace the 0A with the new area size factor (in paragraphs).
  22.  
  23.  
  24.  
  25.      The string searched for in step 2 is a call to allocate space for  the 
  26. environment area:
  27.  
  28.      BB 0A 00       MOV  BX,0AH         ; area size factor=10 decimal
  29.      B4 48          MOV  AH,48          ; allocation function number
  30.      CD 21          INT  21             ; perform allocation call
  31.  
  32.  
  33.  
  34.      The area size factor is calculated as  ((AF+4)*16)-1,   with  
  35. area  factor  AF.   The  default value of 10  decimal  yields  an 
  36. environment  area  of  223 bytes,   increasing  the value  to  20 
  37. decimal  (14H)  will yield an area of 384 bytes;  increasing  the 
  38. value to 30 decimal (1EH) will yield 544 bytes.
  39.  
  40.  
  41. For DOS 2.10 the area factor byte is plugged in at location ECF.
  42.  
  43. For DOS 3.00 the area factor byte is plugged in at location F2C.
  44.  
  45.